package com.shop.service;

import com.shop.dto.CarItem;
import com.shop.model.Cart;

import java.util.List;
import java.util.Map;

public interface CartService {
    List<Cart> getCartsByUserId(Long userId);
    Map<String, Object> decreaseQuantity(Long goodId);

    Map<String, Object> increaseQuantity(Long goodId);
    Map<String, Object> deleteCartItem(Long goodId);

    Map<String, Object> checkout(Long goodId, Long cartId, int count);
    int addCartItem(List<CarItem> carItemList);
    void clearCart(Long userId);
    List<CarItem> getCartItemsByUserId(Long id);
    void addCart(Cart cart);
    Cart getCartByUserIdAndGoodId(Long userId, Long goodId);
    void updateCart(Cart cart);

    Cart getTotalPrice(Integer userId);

    CarItem getCartItem(Integer id);
    List<CarItem> getCar(Long id);
    int deleteCartbyId(Integer id);
}

